<?php
namespace Admin\Pages;
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Page
 *
 * @author nofear
 */
class Page extends \Shared\Page {
    
    protected $projectEntityNamespace = 'Shared\Main\\';
    

    /**
     * @var \Shared\LRC\LRCSupport
     */
    protected $LRCSupport;

    public function __construct() {
        if ( (!isset($_SESSION['user']) || !($_SESSION['user'] instanceof \Shared\Main\Administrator)) && !($this instanceof Login) ) {
            $_SESSION['requestURL'] = $_SERVER['REQUEST_URI'];
            $path = \Shared\URLManager::getInstance()->createPath('admin_login');
            header(sprintf('Location: %s', $path));
            exit;
        }
        parent::__construct();
        $this->LRCSupport = \Shared\Application::getInstance()->getLRCSupport();
    }
}
